import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lib_util/lib_util.dart';

class deleteButton extends StatelessWidget {
  final void Function(BuildContext context) onTap;

  const deleteButton({Key? key, required this.onTap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        width: 60.w,
        decoration: BoxDecoration(
          borderRadius: BorderRadius.circular(8.w),
          color: '#FFEEE6'.toColor(),
        ),
        child: Image.asset(
          'assets/images/wallet/delete.png',
        ),
      ),
      onTap: () {
        onTap(context);
        // Slidable.of(context)?.close();//有外界来考虑是否回复状态
      },
    );
  }
}
